package info.wangyuan.agent.service.rag;


import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Var;
import info.wangyuan.agent.entity.dto.RerankRequestDTO;
import info.wangyuan.agent.entity.dto.RerankResponseDTO;

/**
 * Rerank API Forest接口
 *
 * @author Albert
 * @since 2025-08-25 23:18:29
 */
public interface RerankForestApi {

    /**
     * 调用Rerank API
     *
     * @param apiUrl        API地址
     * @param apiKey        API密钥
     * @param rerankRequest 请求参数
     * @return Rerank响应
     */
    @Post(
            url = "${apiUrl}",
            headers = {"Authorization: Bearer ${apiKey}", "Content-Type: application/json; charset=utf-8"}
    )
    RerankResponseDTO rerank(@Var("apiUrl") String apiUrl,
                             @Var("apiKey") String apiKey,
                             @Body RerankRequestDTO rerankRequest);
}
